package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 链路视图组 实体
 * </p>
 *
 * @author 黄露
 * @since 2021-06-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
// "DeviceLinkGroup对象", description = "链路视图组")
public class DeviceLinkGroup extends Model<DeviceLinkGroup> {

  private static final long serialVersionUID = 1L;

  @TableId(value = "link_group_id", type = IdType.AUTO)
  private Integer linkGroupId;

  private Integer deptId;

  private String groupName;

  private String remark;

  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;

  private String createBy;

  @Override
  public Serializable pkVal() {
    return this.linkGroupId;
  }

  @TableField(exist = false)
  private List<DeviceLink> deviceLinkList;
}
